For each ‘use’ element, the SVG DOM maintains a shadow tree (the
"instance tree") of objects of type SVGElementInstance. An
SVGElementInstance represents a single node in the instance tree. The root object in the instance tree is pointed to by the
instanceRoot attribute on the
SVGUseElement object for the corresponding ‘use’ element.
Properties |
SVGElementInstanceList | - childNodes
- An SVGElementInstanceList that contains all children of this
SVGElementInstance within the instance tree. If there are no
children, this is an SVGElementInstanceList containing no entries
(i.e., an empty list).
|
SVGElement | - correspondingElement
- The corresponding element to which this object is an instance. For
example, if a ‘use’ element references a ‘rect’ element,
then an SVGElementInstance is created, with its
correspondingElement being the SVGRectElement object
for the ‘rect’ element.
|
SVGUseElement | - correspondingUseElement
- The corresponding ‘use’ element to which this
SVGElementInstance object belongs. When ‘use’ elements are
nested (e.g., a ‘use’ references another ‘use’ which
references a graphics element such as a ‘rect’), then the
correspondingUseElement is the outermost ‘use’ (i.e., the
one which indirectly references the ‘rect’, not the one with the
direct reference).
|
SVGElementInstance | - firstChild
- The first child of this SVGElementInstance within the instance
tree. If there is no such SVGElementInstance, this returns null.
|
SVGElementInstance | - lastChild
- The last child of this SVGElementInstance within the instance
tree. If there is no such SVGElementInstance, this returns null.
|
SVGElementInstance | - nextSibling
- The SVGElementInstance immediately following this
SVGElementInstance. If there is no such SVGElementInstance,
this returns null.
|
SVGElementInstance | - parentNode
- The parent of this SVGElementInstance within the instance tree. All SVGElementInstance objects have a parent except the
SVGElementInstance which corresponds to the element which was
directly referenced by the ‘use’ element, in which case
parentNode is null.
|
SVGElementInstance | - previousSibling
- The SVGElementInstance immediately preceding this
SVGElementInstance. If there is no such SVGElementInstance,
this returns null.
|